/**
 * 
 */
package com.wolfpire.info.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wolfpire.info.dao.SchoolServiceInfoDao;
import com.wolfpire.info.model.SchoolServiceInfo;
import com.wolfpire.info.service.SchoolServiceInfoService;
import com.wolfpire.system.common.Constants;
import com.wolfpire.system.common.Page;
import com.wolfpire.system.common.base.dao.IBaseHibernateDao;
import com.wolfpire.system.common.base.service.impl.BaseHibernateService;

/**
 * @author lihd
 *
 */
@Service("schoolServiceInfoService")
public class SchoolServiceInfoServiceImpl extends
		BaseHibernateService<SchoolServiceInfo, Long> implements
		SchoolServiceInfoService {

	@Override
	public List<SchoolServiceInfo> list(SchoolServiceInfo schoolServiceInfo) {
		return this.schoolServiceInfoDao.list(schoolServiceInfo);
	}

	@Override
	public void del(Long id) {
		SchoolServiceInfo schoolServiceInfo = this.schoolServiceInfoDao.get(id);
		if (null != schoolServiceInfo) {
			schoolServiceInfo.setDelFlag(Constants.DELETE_FLAG);
			this.schoolServiceInfoDao.saveOrUpdate(schoolServiceInfo);
		}
	}

	@Override
	public Page<SchoolServiceInfo> setPageDataList(
			Page<SchoolServiceInfo> page,
			SchoolServiceInfo filterSchoolServiceInfo) {
		return this.schoolServiceInfoDao.findSchoolServiceInfos(page, filterSchoolServiceInfo);
	}

	@Override
	protected IBaseHibernateDao<SchoolServiceInfo, Long> getEntityDao() {
		return this.schoolServiceInfoDao;
	}
	
	@Resource private SchoolServiceInfoDao schoolServiceInfoDao;

}
